package com.android.aiod.manager;

import android.content.Context;

import com.wangpm.enteranimation.EnterAnimLayout;

import anim.Anim;
import anim.AnimBaiYeChuang;
import anim.AnimCaChu;
import anim.AnimQiPan;
import anim.AnimShanXingZhanKai;
import anim.AnimXiangNeiRongJie;
import anim.AnimYuanXingKuoZhan;

//切换动画
public class AnimManager {

    Context mContext;
    EnterAnimLayout view;

    public AnimManager(Context mContext, EnterAnimLayout view) {
        this.mContext = mContext;
        this.view = view;
    }

    public void anim() {
        //切换动画， 0 ：无动画    1：百叶窗   2：圆形   3：溶解   4：棋盘    5：扇形  6：擦除
        Anim anim1 = null;
        switch (ConfigManager.instance().configInfo.media_anim_type) {
            case 0:

                break;
            case 1:
                anim1 = new AnimBaiYeChuang(view);
                break;
            case 2:
                anim1 = new AnimYuanXingKuoZhan(view);
                break;
            case 3:
                anim1 = new AnimXiangNeiRongJie(view);
                break;
            case 4:
                anim1 = new AnimQiPan(view);
                break;
            case 5:
                anim1 = new AnimShanXingZhanKai(view);
                break;
            case 6:
                anim1 = new AnimCaChu(view);
                break;
        }
        if (anim1 != null) {
            anim1.startAnimation(ConfigManager.instance().configInfo.media_anim_time * 1000);
        }
    }
}
